<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../static/plugins/bootstrap-3.4.1/css/bootstrap.css">
</head>
<body>
    <div class="container">
        <h1>测试</h1>
        <input type="button" value="按钮" class="btn btn-primary">
    </div>
</body>
<script src="../static/plugins/jQuery/jquery-3.7.1.min.js"></script>
<script type="text/javascript">
    $('input[type="button"]').click(function(){
        $.ajax({
            //发送到的地址
            'url':'./返回的数据.json',
            'type':'get',
            // data就是发送过去的数据
            'data':{
                n1:123,
                n2:456
            },
            // res来源于发送到的地址
            success:function(res){
                console.log(res);
            }
        })
    })
</script>
</html>